package com.itheima.xx.web;

import com.itheima.xx.pojo.Role;
import com.itheima.xx.service.RoleServiceImpl;

import java.util.List;
import java.util.Scanner;

/**
 * Description:
 *
 * @author codermao
 * @date 2023/10/28 17:11
 */
public class QueryAllRolesAndPermissionWeb {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("请输入起始索引：");
        int startIndex = scan.nextInt();
        System.out.println("请输入每页条数：");
        int pageSize = scan.nextInt();

        RoleServiceImpl userService = new RoleServiceImpl();
        List<Role> roleList = userService.queryAllRolesAndPermission(startIndex,pageSize);

        for (Role role : roleList) {
            System.out.println(role);
        }

        scan.close();
    }
}
